﻿@section header
{<!-- Bellows Styles -->
    <link href="~/Themes/RongJi/Style/base/css/category.css" rel="stylesheet" />
}
@section pagetitle
{
    二级分类
}
@if (Model == null)
{ 
    @Html.Raw("暂无二级分类");
}
else
{
    <!--Begin Header-->
    <header class="pageHeader"><img src="~/Themes/RongJi/Style/base/imgs/rongji_banner.png"></header>
    <!--End Header-->
    <!-- InstanceBeginEditable name="body" -->
    <div class="mainwarpper">
        <aside>
            <ul>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct1.png" alt="鲜"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct2.png" alt="特"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct3.png" alt="尚"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct4.png" alt="品"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct5.png" alt="悟"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct6.png" alt="集"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct7.png" alt="礼"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct8.png" alt="全"></a></li>
                <li><a href=""><img src="~/Themes/RongJi/Style/base/imgs/ct9.png" alt="预"></a></li>
            </ul>
        </aside>
        <section>
            <header>
                <span>@Model.ParentCategoryName</span>
            </header>
            <ul>
                @foreach (var item in Model.Categories)
                {
                    <li>
                        @if (@item.CategoryName != "所有产品")
                        {
                            <a  href="~/Sort/SubCategoryList?id=@item.CategoryId&name=@item.CategoryName">
                                <div class="inner">
                                    <img src="~/Themes/RongJi/Style/base/temp/c1.jpg" alt="">
                                    <p>@item.CategoryName</p> 
                                </div>
                            </a>
                        }
                        else
                        {
                            <a  href="~/Product/ProductList?sid=@item.CategoryId">
                                <div class="inner">
                                    <img src="~/Themes/RongJi/Style/base/temp/c1.jpg" alt="">
                                    <p>@item.CategoryName</p> 
                                </div>
                            </a>
                        }
                    </li>
                }
            </ul>
        </section>
    </div>
}
@section footer
{
    <script type="text/javascript" src="~/Utility/pages/regionSelector_FileData.js"></script>
    <script type="text/javascript">
        $(function () {
            //让toolbar选中
            var $homeImg = $("#homeImg");
            var $categoryImg = $("#categoryImg");
            var $myaccountImg = $("#myaccountImg");
            var $searchImg = $("#searchImg");
            
            $homeImg.attr("src", "/Themes/RongJi/Style/base/imgs/f10.png");
            $categoryImg.attr("src", "/Themes/RongJi/Style/base/imgs/f2_c.png");
            $myaccountImg.attr("src", "/Themes/RongJi/Style/base/imgs/f3.png");
            $searchImg.attr("src", "/Themes/RongJi/Style/base/imgs/f4.png");
        });
    </script>
}